package edu.lingnan.lmlibrary.controller;


import edu.lingnan.lmlibrary.common.JSONResult;
import edu.lingnan.lmlibrary.entity.Floor;
import edu.lingnan.lmlibrary.service.FloorService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 张晓航
 * @since 2022-02-26
 */
@RestController
@RequestMapping("/floor")
@CrossOrigin
public class FloorController {
    @Autowired
    private FloorService floorService;
    @ApiOperation("获取各个楼层信息")
    @GetMapping("/getFloorsInfo")
    public JSONResult<List<Floor>> getFloorsInfo(){
        return floorService.getFloorsInfo();
    }
}

